<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/11/011
 * Time: 18:29
 */

namespace app\api\validate;

class CommentValidate extends BaseValidate {
    protected $rule = [
        'product_id' => 'require|isPositiveInteger',
        'order_id' => 'require|isPositiveInteger',
        'order_model' => 'require|in:order,order_buy',
        'level' => 'require|in:1,2.3,4,5',
        'content' => 'require',
        'pm_level' => 'require|in:1,2.3,4,5',
        'pm_content' => 'require',
    ];

    protected $scene = [
        'no_pm'  =>  ['product_id','order_id', 'order_model', 'level', 'content'],
    ];
}